package com.geezdata.cps.base.statemachine;

import java.util.Map;
/**
 * 
 * State(S) x Event(E) -> Actions (A), State(S’)
 *
 * If we are in state S and the event E occurs, 
 * we should perform the actions A and make a transition to the state S’.
 *
 */

public interface State<E extends Stateable> {
    void onEntry(E entity, Map<String, Object> context);

    void onClose(E entity, Map<String, Object> context);
    
    State<E> transfer(E entity, Map<String, Object> context, StateAction<E> action);
}
